import request from '../../utils/request'

//用车申请列表
// export const ycAllList = () => {
//     return request({
//         url: "/apply/apall",
//         method: "GET"
//     })
// }
// 分页查询
export const ycList = (count = 1, limitNum = 10) => {
    return request({
        url: "/apply/apall?count=" + count + "&limitNum=" + limitNum,
        method: "GET"
    })
}
// //修改内容
export const changeyc = (obj) => {
    return request({
        url: "/apply/apupdate",
        method: "PUT",
        data: {
            driver: obj.driver,
            apdate: obj.apdate,
            apreason: obj.apreason,
            aptype: obj.aptype,
            apid: obj.apid,
            aptime: obj.aptime,
            bcdate: obj.bcdate,
        }
    })
}
// //增加
export const addyc = (obj) => {
    return request({
        url: "/apply/apadd",
        method: "POST",
        data: {
            apdate: obj.apdate,
            apreason: obj.apreason,
            aptime: obj.aptime,
            aptype: obj.aptype,
            bcdate: obj.bcdate,
            driver: obj.driver,
        }
    })
}
// //删除
export const delyc = (apid) => {
    return request({
        url: "/apply/apdel/apId",
        method: "DELETE",
        params: {
            apid
        }


    })
}
// //查询车辆
// export const getyc = (car_number) => {
//     return request({
//         url: "/YC_list?car_number=" + car_number,
//         method: "GET"
//     })
// }
//查看
export const kanyc = (apid) => {
    return request({
        url: "/apply/apone/apId",
        method: "GET",
        params: {
            apid
        }

    })
}


// //后端
// export const javawblist = () => {
//     return request({
//         url: "/api/message",
//         method: "GET"
//     })
// }

//还车登记列表
export const bcAllList = () => {
    return request({
        url: "/apply/dropall",
        method: "GET"
    })
}


//还车登记
// 分页查询
export const bcList = (count = 1, limitNum = 10) => {
    return request({
        url: "/apply/dropall?count=" + count + "&limitNum=" + limitNum,
        method: "GET"
    })
}

// //修改内容
export const changebc = (obj) => {
    return request({
        url: "/apply/bcupdate",
        method: "PUT",
        data: {
            id:obj.id,
            driver: obj.driver,
            bcid: obj.bcid,
            bctime: obj.bctime,
            bctype: obj.bctype,
            vehiclestatus: obj.vehiclestatus,
        }
    })
}
// //增加
export const addbc = (obj) => {
    return request({
        url: "/apply/dropadd",
        method: "POST",
        data: {
            driver: obj.driver,
            bcid: obj.bcid,
            bctime: obj.bctime,
            bctype: obj.bctype,
            vehiclestatus: obj.vehiclestatus,
        }
    })
}
// //删除
export const delbc = (id) => {
    return request({
        url: "/apply/dropdel/bcId",
        method: "DELETE",
        params: {
            id
        }


    })
}
// //查询车辆
// export const getyc = (car_number) => {
//     return request({
//         url: "/YC_list?car_number=" + car_number,
//         method: "GET"
//     })
// }
//查看
export const kanbc = (bcid) => {
    return request({
        url: "/apply/dropone/bcId",
        method: "GET",
        params: {
            bcid
        }

    })
}

